

import TenTable from './tenTable.js'
import TenNew from './tenNew.js'
import TenDetail from './tenDetail.js'

import { useState } from 'react'
const Tenant_management = () => {
  //显示哪个组件，1是表格，2是新增
  const [state, setState] = useState(1)
  let com
  if (state == 1) {
    com = <TenTable setState={setState}></TenTable>
  }
  else if (state == 2) {
    com = <TenNew setState={setState}></TenNew>
  }
  else if (state == 3) {
    com = <TenDetail setState={setState}></TenDetail>
  }
  return <>
    {com}
  </>
}

export default Tenant_management
